﻿using dnAnalytics.Math;
using NUnit.Framework;

namespace dnAnalytics.Tests.Math
{
    [TestFixture]
    public class Complex32Math_Multiply32Test
    {
        [Test]
        public void Multiply()
        {
            Complex32 a = new Complex32(1.19209289550780998537e-7f, 1.19209289550780998537e-7f);
            Complex32 b = new Complex32(1.19209289550780998537e-7f, 1.19209289550780998537e-7f);
            TestHelper.TestRelativeError(a*b, new Complex32(0.0f, 2.8421709430403887528e-14f), 1e-7f);
            a = new Complex32(0.0f, 1.19209289550780998537e-7f);
            b = new Complex32(0.0f, -1.19209289550780998537e-7f);
            TestHelper.TestRelativeError(a*b, new Complex32(1.4210854715201943764e-14f, 0.0f), 1e-7f);
            a = new Complex32(0.0f, -1.19209289550780998537e-7f);
            b = new Complex32(0.0f, 5.0e-1f);
            TestHelper.TestRelativeError(a*b, new Complex32(5.96046447753904992685e-8f, 0.0f), 1e-7f);
            a = new Complex32(0.0f, 5.0e-1f);
            b = new Complex32(0.0f, -5.0e-1f);
            TestHelper.TestRelativeError(a*b, new Complex32(2.5e-1f, 0.0f), 1e-7f);
            a = new Complex32(0.0f, -5.0e-1f);
            b = new Complex32(0.0f, 1.0f);
            TestHelper.TestRelativeError(a*b, new Complex32(5.0e-1f, 0.0f), 1e-7f);
            a = new Complex32(0.0f, 1.0f);
            b = new Complex32(0.0f, -1.0f);
            TestHelper.TestRelativeError(a*b, new Complex32(1.0f, 0.0f), 1e-7f);
            a = new Complex32(0.0f, -1.0f);
            b = new Complex32(0.0f, 2.0f);
            TestHelper.TestRelativeError(a*b, new Complex32(2.0f, 0.0f), 1e-7f);
            a = new Complex32(0.0f, 2.0f);
            b = new Complex32(0.0f, -2.0f);
            TestHelper.TestRelativeError(a*b, new Complex32(4.0f, 0.0f), 1e-7f);
            a = new Complex32(0.0f, -2.0f);
            b = new Complex32(0.0f, 8.388608e6f);
            TestHelper.TestRelativeError(a*b, new Complex32(1.6777216e7f, 0.0f), 1e-7f);
            a = new Complex32(0.0f, 8.388608e6f);
            b = new Complex32(0.0f, -8.388608e6f);
            TestHelper.TestRelativeError(a*b, new Complex32(7.0368744177664e13f, 0.0f), 1e-7f);
            a = new Complex32(0.0f, -8.388608e6f);
            b = new Complex32(1.19209289550780998537e-7f, 0.0f);
            TestHelper.TestRelativeError(a*b, new Complex32(0.0f, -9.99999999999997890576e-1f), 1e-7f);
            a = new Complex32(1.19209289550780998537e-7f, 0.0f);
            b = new Complex32(-1.19209289550780998537e-7f, 0.0f);
            TestHelper.TestRelativeError(a*b, new Complex32(-1.4210854715201943764e-14f, 0.0f), 1e-7f);
            a = new Complex32(-1.19209289550780998537e-7f, 0.0f);
            b = new Complex32(1.19209289550780998537e-7f, 1.19209289550780998537e-7f);
            TestHelper.TestRelativeError(a*b, new Complex32(-1.4210854715201943764e-14f, -1.4210854715201943764e-14f), 1e-7f);
            a = new Complex32(1.19209289550780998537e-7f, 1.19209289550780998537e-7f);
            b = new Complex32(1.19209289550780998537e-7f, -1.19209289550780998537e-7f);
            TestHelper.TestRelativeError(a*b, new Complex32(2.8421709430403887528e-14f, 0.0f), 1e-7f);
            a = new Complex32(1.19209289550780998537e-7f, -1.19209289550780998537e-7f);
            b = new Complex32(-1.19209289550780998537e-7f, 1.19209289550780998537e-7f);
            TestHelper.TestRelativeError(a*b, new Complex32(0.0f, 2.8421709430403887528e-14f), 1e-7f);
            a = new Complex32(-1.19209289550780998537e-7f, 1.19209289550780998537e-7f);
            b = new Complex32(-1.19209289550780998537e-7f, -1.19209289550780998537e-7f);
            TestHelper.TestRelativeError(a*b, new Complex32(2.8421709430403887528e-14f, 0.0f), 1e-7f);
            a = new Complex32(-1.19209289550780998537e-7f, -1.19209289550780998537e-7f);
            b = new Complex32(1.19209289550780998537e-7f, 5.0e-1f);
            TestHelper.TestRelativeError(a*b, new Complex32(5.96046305645357840666e-8f, -5.96046589862452144705e-8f), 1e-7f);
            a = new Complex32(1.19209289550780998537e-7f, 5.0e-1f);
            b = new Complex32(1.19209289550780998537e-7f, -5.0e-1f);
            TestHelper.TestRelativeError(a*b, new Complex32(2.50000000000014210855e-1f, 0.0f), 1e-7f);
            a = new Complex32(1.19209289550780998537e-7f, -5.0e-1f);
            b = new Complex32(-1.19209289550780998537e-7f, 5.0e-1f);
            TestHelper.TestRelativeError(a*b, new Complex32(2.49999999999985789145e-1f, 1.19209289550780998537e-7f), 1e-7f);
            a = new Complex32(-1.19209289550780998537e-7f, 5.0e-1f);
            b = new Complex32(-1.19209289550780998537e-7f, -5.0e-1f);
            TestHelper.TestRelativeError(a*b, new Complex32(2.50000000000014210855e-1f, 0.0f), 1e-7f);
            a = new Complex32(-1.19209289550780998537e-7f, -5.0e-1f);
            b = new Complex32(1.19209289550780998537e-7f, 1.0f);
            TestHelper.TestRelativeError(a*b, new Complex32(4.99999999999985789145e-1f, -1.78813934326171497806e-7f), 1e-7f);
            a = new Complex32(1.19209289550780998537e-7f, 1.0f);
            b = new Complex32(1.19209289550780998537e-7f, -1.0f);
            TestHelper.TestRelativeError(a*b, new Complex32(1.00000000000001421085f, 0.0f), 1e-7f);
            a = new Complex32(1.19209289550780998537e-7f, -1.0f);
            b = new Complex32(-1.19209289550780998537e-7f, 1.0f);
            TestHelper.TestRelativeError(a*b, new Complex32(9.99999999999985789145e-1f, 2.38418579101561997074e-7f), 1e-7f);
            a = new Complex32(-1.19209289550780998537e-7f, 1.0f);
            b = new Complex32(-1.19209289550780998537e-7f, -1.0f);
            TestHelper.TestRelativeError(a*b, new Complex32(1.00000000000001421085f, 0.0f), 1e-7f);
            a = new Complex32(-1.19209289550780998537e-7f, -1.0f);
            b = new Complex32(1.19209289550780998537e-7f, 2.0f);
            TestHelper.TestRelativeError(a*b, new Complex32(1.99999999999998578915f, -3.57627868652342995611e-7f), 1e-7f);
            a = new Complex32(1.19209289550780998537e-7f, 2.0f);
            b = new Complex32(1.19209289550780998537e-7f, -2.0f);
            TestHelper.TestRelativeError(a*b, new Complex32(4.00000000000001421085f, 0.0f), 1e-7f);
            a = new Complex32(1.19209289550780998537e-7f, -2.0f);
            b = new Complex32(-1.19209289550780998537e-7f, 2.0f);
            TestHelper.TestRelativeError(a*b, new Complex32(3.99999999999998578915f, 4.76837158203123994148e-7f), 1e-7f);
            a = new Complex32(-1.19209289550780998537e-7f, 2.0f);
            b = new Complex32(-1.19209289550780998537e-7f, -2.0f);
            TestHelper.TestRelativeError(a*b, new Complex32(4.00000000000001421085f, 0.0f), 1e-7f);
            a = new Complex32(-1.19209289550780998537e-7f, -2.0f);
            b = new Complex32(1.19209289550780998537e-7f, 8.388608e6f);
            TestHelper.TestRelativeError(a*b, new Complex32(1.6777216e7f, -1.00000023841857699214f), 1e-7f);
            a = new Complex32(1.19209289550780998537e-7f, 8.388608e6f);
            b = new Complex32(1.19209289550780998537e-7f, -8.388608e6f);
            TestHelper.TestRelativeError(a*b, new Complex32(7.0368744177664e13f, 0.0f), 1e-7f);
            a = new Complex32(1.19209289550780998537e-7f, -8.388608e6f);
            b = new Complex32(-1.19209289550780998537e-7f, 8.388608e6f);
            TestHelper.TestRelativeError(a*b, new Complex32(7.0368744177664e13f, 1.99999999999999578115f), 1e-7f);
            a = new Complex32(-1.19209289550780998537e-7f, 8.388608e6f);
            b = new Complex32(-1.19209289550780998537e-7f, -8.388608e6f);
            TestHelper.TestRelativeError(a*b, new Complex32(7.0368744177664e13f, 0.0f), 1e-7f);
            a = new Complex32(-1.19209289550780998537e-7f, -8.388608e6f);
            b = new Complex32(5.0e-1f, 0.0f);
            TestHelper.TestRelativeError(a*b, new Complex32(-5.96046447753904992685e-8f, -4.194304e6f), 1e-7f);
            a = new Complex32(5.0e-1f, 0.0f);
            b = new Complex32(-5.0e-1f, 0.0f);
            TestHelper.TestRelativeError(a*b, new Complex32(-2.5e-1f, 0.0f), 1e-7f);
            a = new Complex32(-5.0e-1f, 0.0f);
            b = new Complex32(5.0e-1f, 1.19209289550780998537e-7f);
            TestHelper.TestRelativeError(a*b, new Complex32(-2.5e-1f, -5.96046447753904992685e-8f), 1e-7f);
            a = new Complex32(5.0e-1f, 1.19209289550780998537e-7f);
            b = new Complex32(5.0e-1f, -1.19209289550780998537e-7f);
            TestHelper.TestRelativeError(a*b, new Complex32(2.50000000000014210855e-1f, 0.0f), 1e-7f);
            a = new Complex32(5.0e-1f, -1.19209289550780998537e-7f);
            b = new Complex32(-5.0e-1f, 1.19209289550780998537e-7f);
            TestHelper.TestRelativeError(a*b, new Complex32(-2.49999999999985789145e-1f, 1.19209289550780998537e-7f), 1e-7f);
            a = new Complex32(-5.0e-1f, 1.19209289550780998537e-7f);
            b = new Complex32(-5.0e-1f, -1.19209289550780998537e-7f);
            TestHelper.TestRelativeError(a*b, new Complex32(2.50000000000014210855e-1f, 0.0f), 1e-7f);
            a = new Complex32(-5.0e-1f, -1.19209289550780998537e-7f);
            b = new Complex32(5.0e-1f, 5.0e-1f);
            TestHelper.TestRelativeError(a*b, new Complex32(-2.4999994039535522461e-1f, -2.5000005960464477539e-1f), 1e-7f);
            a = new Complex32(5.0e-1f, 5.0e-1f);
            b = new Complex32(5.0e-1f, -5.0e-1f);
            TestHelper.TestRelativeError(a*b, new Complex32(5.0e-1f, 0.0f), 1e-7f);
            a = new Complex32(5.0e-1f, -5.0e-1f);
            b = new Complex32(-5.0e-1f, 5.0e-1f);
            TestHelper.TestRelativeError(a*b, new Complex32(0.0f, 5.0e-1f), 1e-7f);
            a = new Complex32(-5.0e-1f, 5.0e-1f);
            b = new Complex32(-5.0e-1f, -5.0e-1f);
            TestHelper.TestRelativeError(a*b, new Complex32(5.0e-1f, 0.0f), 1e-7f);
            a = new Complex32(-5.0e-1f, -5.0e-1f);
            b = new Complex32(5.0e-1f, 1.0f);
            TestHelper.TestRelativeError(a*b, new Complex32(2.5e-1f, -7.5e-1f), 1e-7f);
            a = new Complex32(5.0e-1f, 1.0f);
            b = new Complex32(5.0e-1f, -1.0f);
            TestHelper.TestRelativeError(a*b, new Complex32(1.25f, 0.0f), 1e-7f);
            a = new Complex32(5.0e-1f, -1.0f);
            b = new Complex32(-5.0e-1f, 1.0f);
            TestHelper.TestRelativeError(a*b, new Complex32(7.5e-1f, 1.0f), 1e-7f);
            a = new Complex32(-5.0e-1f, 1.0f);
            b = new Complex32(-5.0e-1f, -1.0f);
            TestHelper.TestRelativeError(a*b, new Complex32(1.25f, 0.0f), 1e-7f);
            a = new Complex32(-5.0e-1f, -1.0f);
            b = new Complex32(5.0e-1f, 2.0f);
            TestHelper.TestRelativeError(a*b, new Complex32(1.75f, -1.5f), 1e-7f);
            a = new Complex32(5.0e-1f, 2.0f);
            b = new Complex32(5.0e-1f, -2.0f);
            TestHelper.TestRelativeError(a*b, new Complex32(4.25f, 0.0f), 1e-7f);
            a = new Complex32(5.0e-1f, -2.0f);
            b = new Complex32(-5.0e-1f, 2.0f);
            TestHelper.TestRelativeError(a*b, new Complex32(3.75f, 2.0f), 1e-7f);
            a = new Complex32(-5.0e-1f, 2.0f);
            b = new Complex32(-5.0e-1f, -2.0f);
            TestHelper.TestRelativeError(a*b, new Complex32(4.25f, 0.0f), 1e-7f);
            a = new Complex32(-5.0e-1f, -2.0f);
            b = new Complex32(5.0e-1f, 8.388608e6f);
            TestHelper.TestRelativeError(a*b, new Complex32(1.677721575e7f, -4.194305e6f), 1e-7f);
            a = new Complex32(5.0e-1f, 8.388608e6f);
            b = new Complex32(5.0e-1f, -8.388608e6f);
            TestHelper.TestRelativeError(a*b, new Complex32(7.036874417766425e13f, 0.0f), 1e-7f);
            a = new Complex32(5.0e-1f, -8.388608e6f);
            b = new Complex32(-5.0e-1f, 8.388608e6f);
            TestHelper.TestRelativeError(a*b, new Complex32(7.036874417766375e13f, 8.388608e6f), 1e-7f);
            a = new Complex32(-5.0e-1f, 8.388608e6f);
            b = new Complex32(-5.0e-1f, -8.388608e6f);
            TestHelper.TestRelativeError(a*b, new Complex32(7.036874417766425e13f, 0.0f), 1e-7f);
            a = new Complex32(-5.0e-1f, -8.388608e6f);
            b = new Complex32(1.0f, 0.0f);
            TestHelper.TestRelativeError(a*b, new Complex32(-5.0e-1f, -8.388608e6f), 1e-7f);
            a = new Complex32(1.0f, 0.0f);
            b = new Complex32(-1.0f, 0.0f);
            TestHelper.TestRelativeError(a*b, new Complex32(-1.0f, 0.0f), 1e-7f);
            a = new Complex32(-1.0f, 0.0f);
            b = new Complex32(1.0f, 1.19209289550780998537e-7f);
            TestHelper.TestRelativeError(a*b, new Complex32(-1.0f, -1.19209289550780998537e-7f), 1e-7f);
            a = new Complex32(1.0f, 1.19209289550780998537e-7f);
            b = new Complex32(1.0f, -1.19209289550780998537e-7f);
            TestHelper.TestRelativeError(a*b, new Complex32(1.00000000000001421085f, 0.0f), 1e-7f);
            a = new Complex32(1.0f, -1.19209289550780998537e-7f);
            b = new Complex32(-1.0f, 1.19209289550780998537e-7f);
            TestHelper.TestRelativeError(a*b, new Complex32(-9.99999999999985789145e-1f, 2.38418579101561997074e-7f), 1e-7f);
            a = new Complex32(-1.0f, 1.19209289550780998537e-7f);
            b = new Complex32(-1.0f, -1.19209289550780998537e-7f);
            TestHelper.TestRelativeError(a*b, new Complex32(1.00000000000001421085f, 0.0f), 1e-7f);
            a = new Complex32(-1.0f, -1.19209289550780998537e-7f);
            b = new Complex32(1.0f, 5.0e-1f);
            TestHelper.TestRelativeError(a*b, new Complex32(-9.9999994039535522461e-1f, -5.00000119209289550781e-1f), 1e-7f);
            a = new Complex32(1.0f, 5.0e-1f);
            b = new Complex32(1.0f, -5.0e-1f);
            TestHelper.TestRelativeError(a*b, new Complex32(1.25f, 0.0f), 1e-7f);
            a = new Complex32(1.0f, -5.0e-1f);
            b = new Complex32(-1.0f, 5.0e-1f);
            TestHelper.TestRelativeError(a*b, new Complex32(-7.5e-1f, 1.0f), 1e-7f);
            a = new Complex32(-1.0f, 5.0e-1f);
            b = new Complex32(-1.0f, -5.0e-1f);
            TestHelper.TestRelativeError(a*b, new Complex32(1.25f, 0.0f), 1e-7f);
            a = new Complex32(-1.0f, -5.0e-1f);
            b = new Complex32(1.0f, 1.0f);
            TestHelper.TestRelativeError(a*b, new Complex32(-5.0e-1f, -1.5f), 1e-7f);
            a = new Complex32(1.0f, 1.0f);
            b = new Complex32(1.0f, -1.0f);
            TestHelper.TestRelativeError(a*b, new Complex32(2.0f, 0.0f), 1e-7f);
            a = new Complex32(1.0f, -1.0f);
            b = new Complex32(-1.0f, 1.0f);
            TestHelper.TestRelativeError(a*b, new Complex32(0.0f, 2.0f), 1e-7f);
            a = new Complex32(-1.0f, 1.0f);
            b = new Complex32(-1.0f, -1.0f);
            TestHelper.TestRelativeError(a*b, new Complex32(2.0f, 0.0f), 1e-7f);
            a = new Complex32(-1.0f, -1.0f);
            b = new Complex32(1.0f, 2.0f);
            TestHelper.TestRelativeError(a*b, new Complex32(1.0f, -3.0f), 1e-7f);
            a = new Complex32(1.0f, 2.0f);
            b = new Complex32(1.0f, -2.0f);
            TestHelper.TestRelativeError(a*b, new Complex32(5.0f, 0.0f), 1e-7f);
            a = new Complex32(1.0f, -2.0f);
            b = new Complex32(-1.0f, 2.0f);
            TestHelper.TestRelativeError(a*b, new Complex32(3.0f, 4.0f), 1e-7f);
            a = new Complex32(-1.0f, 2.0f);
            b = new Complex32(-1.0f, -2.0f);
            TestHelper.TestRelativeError(a*b, new Complex32(5.0f, 0.0f), 1e-7f);
            a = new Complex32(-1.0f, -2.0f);
            b = new Complex32(1.0f, 8.388608e6f);
            TestHelper.TestRelativeError(a*b, new Complex32(1.6777215e7f, -8.38861e6f), 1e-7f);
            a = new Complex32(1.0f, 8.388608e6f);
            b = new Complex32(1.0f, -8.388608e6f);
            TestHelper.TestRelativeError(a*b, new Complex32(7.0368744177665e13f, 0.0f), 1e-7f);
            a = new Complex32(1.0f, -8.388608e6f);
            b = new Complex32(-1.0f, 8.388608e6f);
            TestHelper.TestRelativeError(a*b, new Complex32(7.0368744177663e13f, 1.6777216e7f), 1e-7f);
            a = new Complex32(-1.0f, 8.388608e6f);
            b = new Complex32(-1.0f, -8.388608e6f);
            TestHelper.TestRelativeError(a*b, new Complex32(7.0368744177665e13f, 0.0f), 1e-7f);
            a = new Complex32(-1.0f, -8.388608e6f);
            b = new Complex32(2.0f, 0.0f);
            TestHelper.TestRelativeError(a*b, new Complex32(-2.0f, -1.6777216e7f), 1e-7f);
            a = new Complex32(2.0f, 0.0f);
            b = new Complex32(-2.0f, 0.0f);
            TestHelper.TestRelativeError(a*b, new Complex32(-4.0f, 0.0f), 1e-7f);
            a = new Complex32(-2.0f, 0.0f);
            b = new Complex32(2.0f, 1.19209289550780998537e-7f);
            TestHelper.TestRelativeError(a*b, new Complex32(-4.0f, -2.38418579101561997074e-7f), 1e-7f);
            a = new Complex32(2.0f, 1.19209289550780998537e-7f);
            b = new Complex32(2.0f, -1.19209289550780998537e-7f);
            TestHelper.TestRelativeError(a*b, new Complex32(4.00000000000001421085f, 0.0f), 1e-7f);
            a = new Complex32(2.0f, -1.19209289550780998537e-7f);
            b = new Complex32(-2.0f, 1.19209289550780998537e-7f);
            TestHelper.TestRelativeError(a*b, new Complex32(-3.99999999999998578915f, 4.76837158203123994148e-7f), 1e-7f);
            a = new Complex32(-2.0f, 1.19209289550780998537e-7f);
            b = new Complex32(-2.0f, -1.19209289550780998537e-7f);
            TestHelper.TestRelativeError(a*b, new Complex32(4.00000000000001421085f, 0.0f), 1e-7f);
            a = new Complex32(-2.0f, -1.19209289550780998537e-7f);
            b = new Complex32(2.0f, 5.0e-1f);
            TestHelper.TestRelativeError(a*b, new Complex32(-3.99999994039535522461f, -1.00000023841857910156f), 1e-7f);
            a = new Complex32(2.0f, 5.0e-1f);
            b = new Complex32(2.0f, -5.0e-1f);
            TestHelper.TestRelativeError(a*b, new Complex32(4.25f, 0.0f), 1e-7f);
            a = new Complex32(2.0f, -5.0e-1f);
            b = new Complex32(-2.0f, 5.0e-1f);
            TestHelper.TestRelativeError(a*b, new Complex32(-3.75f, 2.0f), 1e-7f);
            a = new Complex32(-2.0f, 5.0e-1f);
            b = new Complex32(-2.0f, -5.0e-1f);
            TestHelper.TestRelativeError(a*b, new Complex32(4.25f, 0.0f), 1e-7f);
            a = new Complex32(-2.0f, -5.0e-1f);
            b = new Complex32(2.0f, 1.0f);
            TestHelper.TestRelativeError(a*b, new Complex32(-3.5f, -3.0f), 1e-7f);
            a = new Complex32(2.0f, 1.0f);
            b = new Complex32(2.0f, -1.0f);
            TestHelper.TestRelativeError(a*b, new Complex32(5.0f, 0.0f), 1e-7f);
            a = new Complex32(2.0f, -1.0f);
            b = new Complex32(-2.0f, 1.0f);
            TestHelper.TestRelativeError(a*b, new Complex32(-3.0f, 4.0f), 1e-7f);
            a = new Complex32(-2.0f, 1.0f);
            b = new Complex32(-2.0f, -1.0f);
            TestHelper.TestRelativeError(a*b, new Complex32(5.0f, 0.0f), 1e-7f);
            a = new Complex32(-2.0f, -1.0f);
            b = new Complex32(2.0f, 2.0f);
            TestHelper.TestRelativeError(a*b, new Complex32(-2.0f, -6.0f), 1e-7f);
            a = new Complex32(2.0f, 2.0f);
            b = new Complex32(2.0f, -2.0f);
            TestHelper.TestRelativeError(a*b, new Complex32(8.0f, 0.0f), 1e-7f);
            a = new Complex32(2.0f, -2.0f);
            b = new Complex32(-2.0f, 2.0f);
            TestHelper.TestRelativeError(a*b, new Complex32(0.0f, 8.0f), 1e-7f);
            a = new Complex32(-2.0f, 2.0f);
            b = new Complex32(-2.0f, -2.0f);
            TestHelper.TestRelativeError(a*b, new Complex32(8.0f, 0.0f), 1e-7f);
            a = new Complex32(-2.0f, -2.0f);
            b = new Complex32(2.0f, 8.388608e6f);
            TestHelper.TestRelativeError(a*b, new Complex32(1.6777212e7f, -1.677722e7f), 1e-7f);
            a = new Complex32(2.0f, 8.388608e6f);
            b = new Complex32(2.0f, -8.388608e6f);
            TestHelper.TestRelativeError(a*b, new Complex32(7.0368744177668e13f, 0.0f), 1e-7f);
            a = new Complex32(2.0f, -8.388608e6f);
            b = new Complex32(-2.0f, 8.388608e6f);
            TestHelper.TestRelativeError(a*b, new Complex32(7.036874417766e13f, 3.3554432e7f), 1e-7f);
            a = new Complex32(-2.0f, 8.388608e6f);
            b = new Complex32(-2.0f, -8.388608e6f);
            TestHelper.TestRelativeError(a*b, new Complex32(7.0368744177668e13f, 0.0f), 1e-7f);
            a = new Complex32(-2.0f, -8.388608e6f);
            b = new Complex32(8.388608e6f, 0.0f);
            TestHelper.TestRelativeError(a*b, new Complex32(-1.6777216e7f, -7.0368744177664e13f), 1e-7f);
            a = new Complex32(8.388608e6f, 0.0f);
            b = new Complex32(-8.388608e6f, 0.0f);
            TestHelper.TestRelativeError(a*b, new Complex32(-7.0368744177664e13f, 0.0f), 1e-7f);
            a = new Complex32(-8.388608e6f, 0.0f);
            b = new Complex32(8.388608e6f, 1.19209289550780998537e-7f);
            TestHelper.TestRelativeError(a*b, new Complex32(-7.0368744177664e13f, -9.99999999999997890576e-1f), 1e-7f);
            a = new Complex32(8.388608e6f, 1.19209289550780998537e-7f);
            b = new Complex32(8.388608e6f, -1.19209289550780998537e-7f);
            TestHelper.TestRelativeError(a*b, new Complex32(7.0368744177664e13f, 0.0f), 1e-7f);
            a = new Complex32(8.388608e6f, -1.19209289550780998537e-7f);
            b = new Complex32(-8.388608e6f, 1.19209289550780998537e-7f);
            TestHelper.TestRelativeError(a*b, new Complex32(-7.0368744177664e13f, 1.99999999999999578115f), 1e-7f);
            a = new Complex32(-8.388608e6f, 1.19209289550780998537e-7f);
            b = new Complex32(-8.388608e6f, -1.19209289550780998537e-7f);
            TestHelper.TestRelativeError(a*b, new Complex32(7.0368744177664e13f, 0.0f), 1e-7f);
            a = new Complex32(-8.388608e6f, -1.19209289550780998537e-7f);
            b = new Complex32(8.388608e6f, 5.0e-1f);
            TestHelper.TestRelativeError(a*b, new Complex32(-7.03687441776639999999e13f, -4.194305e6f), 1e-7f);
            a = new Complex32(8.388608e6f, 5.0e-1f);
            b = new Complex32(8.388608e6f, -5.0e-1f);
            TestHelper.TestRelativeError(a*b, new Complex32(7.036874417766425e13f, 0.0f), 1e-7f);
            a = new Complex32(8.388608e6f, -5.0e-1f);
            b = new Complex32(-8.388608e6f, 5.0e-1f);
            TestHelper.TestRelativeError(a*b, new Complex32(-7.036874417766375e13f, 8.388608e6f), 1e-7f);
            a = new Complex32(-8.388608e6f, 5.0e-1f);
            b = new Complex32(-8.388608e6f, -5.0e-1f);
            TestHelper.TestRelativeError(a*b, new Complex32(7.036874417766425e13f, 0.0f), 1e-7f);
            a = new Complex32(-8.388608e6f, -5.0e-1f);
            b = new Complex32(8.388608e6f, 1.0f);
            TestHelper.TestRelativeError(a*b, new Complex32(-7.03687441776635e13f, -1.2582912e7f), 1e-7f);
            a = new Complex32(8.388608e6f, 1.0f);
            b = new Complex32(8.388608e6f, -1.0f);
            TestHelper.TestRelativeError(a*b, new Complex32(7.0368744177665e13f, 0.0f), 1e-7f);
            a = new Complex32(8.388608e6f, -1.0f);
            b = new Complex32(-8.388608e6f, 1.0f);
            TestHelper.TestRelativeError(a*b, new Complex32(-7.0368744177663e13f, 1.6777216e7f), 1e-7f);
            a = new Complex32(-8.388608e6f, 1.0f);
            b = new Complex32(-8.388608e6f, -1.0f);
            TestHelper.TestRelativeError(a*b, new Complex32(7.0368744177665e13f, 0.0f), 1e-7f);
            a = new Complex32(-8.388608e6f, -1.0f);
            b = new Complex32(8.388608e6f, 2.0f);
            TestHelper.TestRelativeError(a*b, new Complex32(-7.0368744177662e13f, -2.5165824e7f), 1e-7f);
            a = new Complex32(8.388608e6f, 2.0f);
            b = new Complex32(8.388608e6f, -2.0f);
            TestHelper.TestRelativeError(a*b, new Complex32(7.0368744177668e13f, 0.0f), 1e-7f);
            a = new Complex32(8.388608e6f, -2.0f);
            b = new Complex32(-8.388608e6f, 2.0f);
            TestHelper.TestRelativeError(a*b, new Complex32(-7.036874417766e13f, 3.3554432e7f), 1e-7f);
            a = new Complex32(-8.388608e6f, 2.0f);
            b = new Complex32(-8.388608e6f, -2.0f);
            TestHelper.TestRelativeError(a*b, new Complex32(7.0368744177668e13f, 0.0f), 1e-7f);
            a = new Complex32(-8.388608e6f, -2.0f);
            b = new Complex32(8.388608e6f, 8.388608e6f);
            TestHelper.TestRelativeError(a*b, new Complex32(-7.0368727400448e13f, -7.036876095488e13f), 1e-7f);
            a = new Complex32(8.388608e6f, 8.388608e6f);
            b = new Complex32(8.388608e6f, -8.388608e6f);
            TestHelper.TestRelativeError(a*b, new Complex32(1.40737488355328e14f, 0.0f), 1e-7f);
            a = new Complex32(8.388608e6f, -8.388608e6f);
            b = new Complex32(-8.388608e6f, 8.388608e6f);
            TestHelper.TestRelativeError(a*b, new Complex32(0.0f, 1.40737488355328e14f), 1e-7f);
            a = new Complex32(-8.388608e6f, 8.388608e6f);
            b = new Complex32(-8.388608e6f, -8.388608e6f);
            TestHelper.TestRelativeError(a*b, new Complex32(1.40737488355328e14f, 0.0f), 1e-7f);
            a = new Complex32(-8.388608e6f, -8.388608e6f);
            b = new Complex32(0.0f, 1.19209289550780998537e-7f);
            TestHelper.TestRelativeError(a*b, new Complex32(9.99999999999997890576e-1f, -9.99999999999997890576e-1f), 1e-7f);
        }
    }
}